From 7288d93a9fd665bfac381007fc8201975b97f74b Mon Sep 17 00:00:00 2001 From: Debian LibreOffice Maintainers Date: Wed, 25 Mar 2026 21:39:29 +0100 Subject: [PATCH] we-dont-have-the-needed-fonts Gbp-Pq: Name we-dont-have-the-needed-fonts.diff --- sd/qa/unit/export-tests.cxx | 66 ------------------------ sw/qa/core/text/text.cxx | 5 ++ vcl/qa/cppunit/complextext.cxx | 43 --------------- vcl/qa/cppunit/pdfexport/pdfexport2.cxx | Bin 284590 -> 284974 bytes 4 files changed, 5 insertions(+), 109 deletions(-) diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 15c867227d8..775edef34b8 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -1063,72 +1063,6 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfTextPos) assertXPath(pXml, "//textarray", 1); } -CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfFont) -{ - auto pPdfium = vcl::pdf::PDFiumLibrary::get(); - if (!pPdfium) - return; - UsePdfium aGuard; - - loadFromFile(u"pdf/differentfonts.pdf"); - - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); - setImportFilterName(TestFilter::FODG); - saveAndReload(TestFilter::FODG); - - xmlDocUniquePtr pXml = parseLayout(); - { - OUString sItalic = getXPath(pXml, "//font[2]", "italic"); - // was "none" before - CPPUNIT_ASSERT_EQUAL(u"normal"_ustr, sItalic); - // check that the others remain as expected - OUString sFontName = getXPath(pXml, "//font[2]", "name"); - CPPUNIT_ASSERT_EQUAL(u"Liberation Serif"_ustr, sFontName); - int nFontHeight = getXPath(pXml, "//font[2]", "height").toInt32(); - CPPUNIT_ASSERT_EQUAL(494, nFontHeight); - } -#if !defined _WIN32 - //TODO, debug this - { - OUString sWeight = getXPath(pXml, "//font[3]", "weight"); - // was "normal" before - CPPUNIT_ASSERT_EQUAL(u"bold"_ustr, sWeight); - // check that the others remain as expected - OUString sFontName = getXPath(pXml, "//font[3]", "name"); - CPPUNIT_ASSERT_EQUAL(u"Liberation Sans"_ustr, sFontName); - sal_Int32 nFontHeight = getXPath(pXml, "//font[3]", "height").toInt32(); - CPPUNIT_ASSERT_EQUAL(564, nFontHeight); - } -#endif -} - -CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfHindi) -{ - auto pPdfium = vcl::pdf::PDFiumLibrary::get(); - if (!pPdfium) - return; - UsePdfium aGuard; - - loadFromFile(u"pdf/BasicHindi.pdf"); - - setFilterOptions("{\"DecomposePDF\":{\"type\":\"boolean\",\"value\":\"true\"}}"); - save(TestFilter::FODG); - - xmlDocUniquePtr pXmlDoc = parseExportedFile(); - - // Check that the English text in here is correct at least - - // ensure the expected content - assertXPathContent(pXmlDoc, - "/office:document/office:body/office:drawing/draw:page/draw:g/draw:frame[3]/" - "draw:text-box/text:p[@text:style-name='P4'][1]", - u"FIRST-YEAR HINDI COURSE"); - - // ensure the expected font name - assertXPath(pXmlDoc, "/office:document/office:automatic-styles/style:style[@style:name='P4']/" - "style:text-properties[@style:font-name='AcademyEngravedLetPlain']"); -} - CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfGrayscaleImageUnderInvisibleTest) { auto pPdfium = vcl::pdf::PDFiumLibrary::get(); diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx index 5eef468719c..1d75c321f98 100644 --- a/sw/qa/core/text/text.cxx +++ b/sw/qa/core/text/text.cxx @@ -9,6 +9,8 @@ #include +#include + #include #include @@ -1594,6 +1596,8 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testParaUpperMarginFlyIntersect) CPPUNIT_ASSERT_EQUAL(521, nHeight); } +/* needs Source Han Serif SC*/ +#if HAVE_MORE_FONTS CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810) { // Load the document. @@ -1630,6 +1634,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testTdf129810) } } } +#endif CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testScriptinfosurrogatePairs) { diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx index 5b4e36ac88c..8793ecb4719 100644 --- a/vcl/qa/cppunit/complextext.cxx +++ b/vcl/qa/cppunit/complextext.cxx @@ -790,49 +790,6 @@ CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf165510) } } -CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf154104) -{ - ScopedVclPtrInstance pOutDev; - - vcl::Font aBaseFont{ u"David Libre"_ustr, u"Regular"_ustr, Size{ 0, 72 } }; - pOutDev->SetFont(aBaseFont); - - vcl::Font aFallbackFont{ u"Noto Sans Arabic"_ustr, u"Regular"_ustr, Size{ 0, 72 } }; - pOutDev->ForceFallbackFont(aFallbackFont); - - pOutDev->SetLayoutMode(vcl::text::ComplexTextLayoutFlags::BiDiRtl - | vcl::text::ComplexTextLayoutFlags::BiDiStrong); - - auto aText = u"\u05D0\u05D0\u05D0\u0644\u0627"_ustr; - KernArray aKernArray = { 100, 200, 300, 350, 400 }; - auto pLayout = pOutDev->ImplLayout(aText, /*nIndex*/ 0, /*nLen*/ aText.getLength(), - /*rLogicPos*/ Point(0, 0), /*nLogicWidth*/ 0, aKernArray); - - // Fallback must have happened for this test to be meaningful - auto pMultiLayout = dynamic_cast(pLayout.get()); - CPPUNIT_ASSERT(pMultiLayout); - - std::vector aCharX; - - const GlyphItem* pGlyph = nullptr; - basegfx::B2DPoint stPos; - int nCurrPos = 0; - while (pLayout->GetNextGlyph(&pGlyph, stPos, nCurrPos)) - { - aCharX.push_back(stPos.getX()); - } - - // tdf#154104 caused overlapping glyphs in fallback runs: - // { -295.0, -195.0, -95.0, -341.0 } - std::vector aRefCharX{ -245.0, -145.0, -45.0, -341.0 }; - - CPPUNIT_ASSERT_EQUAL(aRefCharX.size(), aCharX.size()); - for (size_t i = 0; i < aRefCharX.size(); ++i) - { - CPPUNIT_ASSERT_DOUBLES_EQUAL(aRefCharX.at(i), aCharX.at(i), /*delta*/ 0.2); - } -} - CPPUNIT_TEST_FIXTURE(VclComplexTextTest, testTdf163761) { ScopedVclPtrInstance pOutDev; diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx index e0bc9337994e691819fd3387a4be95f63fb79f5a..9d59a600cc742ad043cfda7c9dfd3a1946bb5e81 100644 GIT binary patch delta 893 zcmY+AL1+_E5Qa&nQVkj#X$7NgCxXz#nh>-NB_aeAnu9HAMJUqZCcb8uq`NWuk|0vj zKu=y2qJ1iD(_B4N5k>H1FXBNDRnUtl@t}D0ETV6Aw@KZ@n|U+;|INJJeC*qN>RVcN zExVt=S5XaN$z&!@7~H^VMK>`~RMJ`|?7ClKMk!19`OK-jX3CvZqhd;v^`i5d zsigCA5svdlQ8KzK;ZVdAiHI)(&bnnxrCq}ZV$rdY(V#5fq}JqpI4xUsS9Nkvgv9me zOx(_d_W}5+mzujI3dg&;39Ia0SE>9zZ9%|^289Q9i7tzly89pI6U zX3^nMv>)Ubk5=2e)VAG6#phKxW+7g~pjcRk0WonG_EROX1|v=kipE;I7!-dUg$4M% zW&?IEJtB9{*0vmEs7-mb-l2HMX2ZOwEer*Nak-puHDHv4J6rV}ibnrakf_jrDH6F> zpqJvu2F%G=4?O7?cUEA0SKco^Y{1Fh&fh>>q(Ov!q2R;~#L g+n3wBF1|Cf!>CNL48IcV82iL0Tl3<36W%=k2TMH)(EtDd delta 258 zcmZ3tNpRhI!G;#b7N#xC_oq*PI)mAI@*y9c>3%br*(V=z6P=znlUZTAcmwk^#_1D| zF#AsLoXsq@z2Gsk9@F%XbD71bpO0r|o&Nq4kfkw?S!O!-RA%YvhvzdZP4}C^tUldg z3NzpIZaC`@ob?~X>YC3iFx_k_goV(nH(mQPv&MAk1~zJ?%tq5Y7XXdZ ze#R_2U27gQACsZs_Qg|~k26l6zlfP_`sC@%qSN;*0vZWq$un9^@1M>rIsMFZW-dlc X2wQ(KGyn8_kg`x9YkS&a<`Y{1J{Mk( -- 2.30.2